﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="UserCompanyInfoList.aspx.cs"
    Inherits="Manage_UserCompanyInfoList" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
    <link href="../images/skin.css" rel="stylesheet" type="text/css" />
    <script src="../js/hoverbg.js" type="text/javascript"></script>
    <script src="../js/common.js" type="text/javascript"></script>
    <script src="/js/lib/jquery1.4.2.min.js" type="text/javascript"></script>
    <script type="text/javascript">
        function goModify()
        {
            var id = 0;
            $("input[name='ids']").each(function (i)
            {
                if (this.checked)
                {
                    id = this.value;
                    return;
                }
            });
            if (id == 0)
            {
                alert("未选择项目！");
                return false;
            }
            else
            {
                document.location = "UserCompanyInfoOperate.aspx?act=edit&id=" + id;
            }
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <table width="100%" border="0" cellpadding="0" cellspacing="0">
            <tr>
                <td width="17" height="29" valign="top" background="../images/mail_leftbg.gif">
                    <img src="../images/left-top-right.gif" width="17" height="29" />
                </td>
                <td width="1354" height="29" valign="top" background="../images/content-bg.gif">
                    <table width="100%" height="31" border="0" cellpadding="0" cellspacing="0" class="left_topbg"
                        id="table2">
                        <tr>
                            <td height="31">
                                <div class="titlebt">
                                企业信息管理</div>
                            </td>
                        </tr>
                    </table>
                </td>
                <td width="24" valign="top" background="../images/mail_rightbg.gif">
                    <img src="../images/nav-right-bg.gif" width="16" height="29" />
                </td>
            </tr>
            <tr>
                <td height="71" valign="middle" background="../images/mail_leftbg.gif">
                    &nbsp;
                </td>
                <td valign="top" bgcolor="#F7F8F9">
                    <table width="100%" height="138" border="0" cellpadding="0" cellspacing="0">
                        <tr>
                            <td height="13" valign="top">
                                &nbsp;
                            </td>
                        </tr>
                        <tr>
                            <td valign="top">
                                <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" class="maintop">
                                    <tr>
                                        <td>
                                            <table class="partition">
                                                <tbody>
                                                    <tr>
                                                        <th width="10%">
                                                            公司名称：
                                                        </th>
                                                        <td width="31%">
                                                            <input id="sk" type="text" name="sk" />
                                                        </td>
                                                        <td colspan="3">
                                                            <input type="submit" value="搜索" onclick="if(document.getElementById('sk').value=='') return false" />
                                                        </td>
                                                    </tr>
                                                </tbody>
                                            </table>
                                        </td>
                                    </tr>
                                </table>
                                <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
                                    <tr>
                                        <td width="46%" valign="middle">
                                            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                                <tr>
                                                    <td width="5%">
                                                        <img src="../images/date_go.png" width="16" height="16" />
                                                    </td>
                                                    <td width="95%" class="STYLE5">
                                                        <span class="STYLE6">你当前的位置</span>：[企业信息管理]-[企业信息列表]
                                                    </td>
                                                </tr>
                                            </table>
                                        </td>
                                        <td width="54%">
                                            <table border="0" align="right" width="300" cellpadding="0" cellspacing="0">
                                                <tr>
                                                    <td width="60" class="STYLE5">
                                                        <input type="checkbox" id="allCheck" onclick="CheckAll('ids');" />全选
                                                    </td>
                                                    <td width="60" class="STYLE5">
                                                        <input type="checkbox" id="clearCheck" onclick="CheckOther('ids');" />反选
                                                    </td>
                                                    <td>
                                                        <a href="UserCompanyInfoOperate.aspx?act=add">
                                                            <img src="../images/22.gif" width="14" height="14" align="absmiddle" />
                                                            新增</a>
                                                    </td>
                                                    <td>
                                                        <img src="../images/33.gif" width="14" height="14" align="absmiddle" />
                                                        <a href="javascript:void(0);" onclick="goModify()">修改</a>
                                                    </td>
                                                    <td>
                                                        <asp:LinkButton ID="lkbtnBatchDel" runat="server" OnClientClick="return confirm('删除此项，操作无法恢复。\n\n确实要执行吗？');return false;"
                                                            OnClick="lkbtnBatchDel_Click"><img src="../images/11.gif" width="14" height="14" align="absmiddle" /> 删除</asp:LinkButton>
                                                    </td>
                                                </tr>
                                            </table>
                                        </td>
                                    </tr>
                                </table>
                                <asp:GridView ID="gvDatalist" EnableViewState="false" runat="server" AutoGenerateColumns="False"
                                    align="center" CellPadding="0" CellSpacing="1" BackColor="#C5D5E4" onMouseOver="changeto()"
                                    onmouseout="changeback()" CssClass="maintop list" GridLines="None" Width="90%"
                                    EmptyDataText="暂无有效内容" EmptyDataRowStyle-BackColor="#ffffff" EmptyDataRowStyle-ForeColor="#777777"
                                    EmptyDataRowStyle-HorizontalAlign="Center">
                                    <Columns>
                                        <asp:TemplateField HeaderText="选择/ID">
                                            <HeaderStyle CssClass="listtitle" Wrap="false" />
                                            <ItemStyle Wrap="false" />
                                            <ItemTemplate>
                                                <input type="checkbox" id="ids" name="ids" value="<%# Eval("UserID").ToString() %>" /><%# Eval("UserID").ToString() %>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:BoundField HeaderText="企业名称" DataField="CompanyName" HeaderStyle-CssClass="listtitle" />
                                        <asp:BoundField HeaderText="联系人" DataField="ContactPerson" HeaderStyle-CssClass="listtitle" />
                                        <asp:BoundField HeaderText="固定电话" DataField="Tel" HeaderStyle-CssClass="listtitle" />
                                        <asp:BoundField HeaderText="手机" DataField="Mobile" HeaderStyle-CssClass="listtitle" />
                                        <asp:BoundField HeaderText="qq" DataField="qq" HeaderStyle-CssClass="listtitle" />
                                        <asp:BoundField HeaderText="Email" DataField="Email" HeaderStyle-CssClass="listtitle" />
                                        <asp:HyperLinkField HeaderText="公司网址" Text="查看" Target="_blank" DataNavigateUrlFields="Website"
                                            DataNavigateUrlFormatString="{0}" HeaderStyle-CssClass="listtitle" />
                                        <asp:BoundField HeaderText="经营类别" DataField="SalesType" HeaderStyle-CssClass="listtitle" />
                                        <asp:TemplateField HeaderText="操作">
                                            <HeaderStyle CssClass="listtitle" Wrap="false" />
                                            <ItemStyle HorizontalAlign="Center" />
                                            <ItemStyle Wrap="false" />
                                            <ItemTemplate>
                                                <a href="UserCompanyInfoOperate.aspx?act=edit&id=<%# Eval("UserID").ToString() %>"><span
                                                    class="STYLE8">
                                                    <img src="../images/edt.gif" width="16" height="16" align="absmiddle" />编辑</span></a>
                                                &nbsp;&nbsp;<a href="UserCompanyInfoList.aspx?act=del&id=<%# Eval("UserID").ToString() %>"
                                                    onclick="return confirm('删除此项，操作无法恢复。\n\n确实要执行吗？');return false;"><span class="STYLE8"><img
                                                        src="../images/del1.gif" width="16" height="16" align="absmiddle" />删除</span></a>
                                                &nbsp;&nbsp;<a href="../User/UserUtils.aspx?act=login&id=<%# Eval("UserID").ToString() %>"
                                                    target="_blank">登陆</a>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                    </Columns>
                                </asp:GridView>
                                <div style="text-align: right;" class="STYLE10">
                                    <asp:Literal ID="ltPage" runat="server"></asp:Literal></div>
                            </td>
                        </tr>
                    </table>
                </td>
                <td background="../images/mail_rightbg.gif">
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td valign="middle" background="../images/mail_leftbg.gif">
                    <img src="../images/buttom_left2.gif" width="17" height="17" />
                </td>
                <td height="17" valign="top" background="../images/buttom_bgs.gif">
                    <img src="../images/buttom_bgs.gif" width="17" height="17" />
                </td>
                <td background="../images/mail_rightbg.gif">
                    <img src="../images/buttom_right2.gif" width="16" height="17" />
                </td>
            </tr>
        </table>
    </div>
    </form>
</body>
</html>
